package com.zb.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author WEN
 * @Date 2023/8/2 0002
 **/
@Data
@ApiModel("商品规格")
public class GoodsSpecVo {
    @ApiModelProperty(value = "规格ID，新增时不必传，修改时必传")
    private Long id;

    @NotBlank(message = "规格名称不能为空")
    @Length(max = 20, message = "规格名称字条长度限制在20个以内")
    @ApiModelProperty(value = "规格名称", required = true, example = "")
    private String name;

    @ApiModelProperty(value = "规格状态：false-启用，true-禁用", required = true, example = "false")
    private Boolean status;

    @Valid
    @NotNull(message = "规格内容不能为空")
    @Size(min = 1, message = "规格内容至少填写一项")
    @ApiModelProperty(value = "规格内容", required = true)
    private List<GoodsSpecContentVo> contentList;

    @ApiModelProperty(value = "删除的规格内容ID集合")
    private List<Long> contentIdList;

}
